<script>
	export default {
		onLaunch: function() {
			try {
				const jsloguser = uni.getStorageSync('jsloguser');
				if (jsloguser) {
					uni.switchTab({
					    url: '/pages/index/index'
					});
				}else{
					uni.navigateTo({
					    url: '/pages/user/login'
					});
				}
			} catch (e) {
				console.log('登录失败')
				console.log('e')
				// uni.navigateTo({
				//     url: '/pages/user/login'
				// });
			}
		},
		onShow: function() {
			//console.log('App Show')
		},
		onHide: function() {
			//console.log('App Hide')
		},
	}
</script>

<style>
	/*每个页面公共css */
</style>
